package by.parfen.game.websocket.client;

import javax.websocket.ClientEndpoint;
import javax.websocket.OnClose;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;

@ClientEndpoint
public class AnnotatedClientEndpoint {

	@OnMessage
	public void processMessageFromServer(String message, Session session) {
		System.out.println("Message came from the server ! " + message);
	}

	@OnOpen
	public void onOpen(Session session) {
		System.out.println("ClientEndpoint: Connection opened...");
	}

	@OnClose
	public void onClose(Session session) {
		System.out.println("ClientEndpoint: Connection closed!");
	}

}
